package com.hyf.glidedemo;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import com.hyf.glidedemo.activity.GlideBaseActivity;
import com.hyf.glidedemo.activity.GlideRecyclerViewActivity;
import com.hyf.glidedemo.activity.GlideTransformationsActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    private Button btnBase, btnRecyclerView, btnTransformation;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        btnBase = findViewById(R.id.btn_glide_base);
        btnRecyclerView = findViewById(R.id.btn_glide_recyclerview);
        btnTransformation = findViewById(R.id.btn_glide_transformations);
        btnBase.setOnClickListener(this);
        btnRecyclerView.setOnClickListener(this);
        btnTransformation.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_glide_base:
                startActivity(new Intent(MainActivity.this, GlideBaseActivity.class));
                break;
            case R.id.btn_glide_recyclerview:
                startActivity(new Intent(MainActivity.this, GlideRecyclerViewActivity.class));
                break;
            case R.id.btn_glide_transformations:
                startActivity(new Intent(MainActivity.this, GlideTransformationsActivity.class));
                break;
        }
    }
}
